package com.xd.service.admin.XTGLY.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.xd.Entity.EntityBrand;
import com.xd.Entity.EntityCatergory;
import com.xd.Mapper.CatergoryMapper;
import com.xd.Result.CommonResult;
import com.xd.service.admin.XTGLY.CatergorylikeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pojo.XTGLY.Catergory;

import java.util.List;
@Service
public class CatergorylikeServiceImpl implements CatergorylikeService {
    @Autowired
    CatergoryMapper catergoryMapper;
    @Override
    public PageInfo<EntityCatergory> getCatergory(Catergory catergory) {
        PageHelper.startPage(catergory.getNum(), catergory.getPageSize());
        List<EntityCatergory> catergories = catergoryMapper.queryProducCatergories(catergory);
        return new PageInfo<>(catergories);
    }
}
